#include<reg52.h>
#include<stdio.h>
#include<string.h>
#include<intrins.h>

void uart_write(char c){
	SBUF=c;
	while(TI==0);
	TI=0;
}
char uart_read(){
	char c;
	while(RI==0);
	c=SBUF;
	RI=0;
	return c;
}
void main(void){
	int count=0;
	SCON=0x50;
	TMOD |= 0x20;
	TH1 = 221;
	TR1=1;
	while(1){
		char c=uart_read();
		uart_write(c);
		if(c=='\r'){
			uart_write('\n');
		}
	}
}